package yogiro.to;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class ProductTO {
	
	private int productNo;								//상품번호
	private String productName;					//상품 이름
	private String productIntroduce;			//상품소개
	private String productCourse;				//상품코스
	private String productStartDate;			//상품시작날짜
	private String productEndDate;				//상품종료날짜
	private String[] productStartTime;		//상품시작시간
	private int productMaximumNumber;	//상품정원
	private String productLeadtime;			//상품소요시간
	private String productDate;					//예약한상품날짜
	private String ProductTime;					//예약한상품시작시간
	private List upFile;                                  //사진 정보
	private ArrayList photoName;               //사진 이름
	private ArrayList date;
	private ArrayList time;
	private ArrayList photo;
	private ProductPhotoTO ppto;
	private ProductDateTO pdto;
	private ProductTimeTO ptto;
	
	public ProductTO(){}

	public ProductTO(int productNo, String productName,
			String productIntroduce, String productCourse,
			String productStartDate, String productEndDate,
			String[] productStartTime, int productMaximumNumber,
			String productLeadtime, String productDate, String productTime,
			List upFile, ArrayList photoName, ArrayList date, ArrayList time,
			ArrayList photo, ProductPhotoTO ppto, ProductDateTO pdto,
			ProductTimeTO ptto) {
		super();
		this.productNo = productNo;
		this.productName = productName;
		this.productIntroduce = productIntroduce;
		this.productCourse = productCourse;
		this.productStartDate = productStartDate;
		this.productEndDate = productEndDate;
		this.productStartTime = productStartTime;
		this.productMaximumNumber = productMaximumNumber;
		this.productLeadtime = productLeadtime;
		this.productDate = productDate;
		ProductTime = productTime;
		this.upFile = upFile;
		this.photoName = photoName;
		this.date = date;
		this.time = time;
		this.photo = photo;
		this.ppto = ppto;
		this.pdto = pdto;
		this.ptto = ptto;
	}

	public int getProductNo() {
		return productNo;
	}

	public void setProductNo(int productNo) {
		this.productNo = productNo;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getProductIntroduce() {
		return productIntroduce;
	}

	public void setProductIntroduce(String productIntroduce) {
		this.productIntroduce = productIntroduce;
	}

	public String getProductCourse() {
		return productCourse;
	}

	public void setProductCourse(String productCourse) {
		this.productCourse = productCourse;
	}

	public String getProductStartDate() {
		return productStartDate;
	}

	public void setProductStartDate(String productStartDate) {
		this.productStartDate = productStartDate;
	}

	public String getProductEndDate() {
		return productEndDate;
	}

	public void setProductEndDate(String productEndDate) {
		this.productEndDate = productEndDate;
	}

	public String[] getProductStartTime() {
		return productStartTime;
	}

	public void setProductStartTime(String[] productStartTime) {
		this.productStartTime = productStartTime;
	}

	public int getProductMaximumNumber() {
		return productMaximumNumber;
	}

	public void setProductMaximumNumber(int productMaximumNumber) {
		this.productMaximumNumber = productMaximumNumber;
	}

	public String getProductLeadtime() {
		return productLeadtime;
	}

	public void setProductLeadtime(String productLeadtime) {
		this.productLeadtime = productLeadtime;
	}

	public String getProductDate() {
		return productDate;
	}

	public void setProductDate(String productDate) {
		this.productDate = productDate;
	}

	public String getProductTime() {
		return ProductTime;
	}

	public void setProductTime(String productTime) {
		ProductTime = productTime;
	}

	public List getUpFile() {
		return upFile;
	}

	public void setUpFile(List upFile) {
		this.upFile = upFile;
	}

	public ArrayList getPhotoName() {
		return photoName;
	}

	public void setPhotoName(ArrayList photoName) {
		this.photoName = photoName;
	}

	public ArrayList getDate() {
		return date;
	}

	public void setDate(ArrayList date) {
		this.date = date;
	}

	public ArrayList getTime() {
		return time;
	}

	public void setTime(ArrayList time) {
		this.time = time;
	}

	public ArrayList getPhoto() {
		return photo;
	}

	public void setPhoto(ArrayList photo) {
		this.photo = photo;
	}

	public ProductPhotoTO getPpto() {
		return ppto;
	}

	public void setPpto(ProductPhotoTO ppto) {
		this.ppto = ppto;
	}

	public ProductDateTO getPdto() {
		return pdto;
	}

	public void setPdto(ProductDateTO pdto) {
		this.pdto = pdto;
	}

	public ProductTimeTO getPtto() {
		return ptto;
	}

	public void setPtto(ProductTimeTO ptto) {
		this.ptto = ptto;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((ProductTime == null) ? 0 : ProductTime.hashCode());
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result + ((pdto == null) ? 0 : pdto.hashCode());
		result = prime * result + ((photo == null) ? 0 : photo.hashCode());
		result = prime * result
				+ ((photoName == null) ? 0 : photoName.hashCode());
		result = prime * result + ((ppto == null) ? 0 : ppto.hashCode());
		result = prime * result
				+ ((productCourse == null) ? 0 : productCourse.hashCode());
		result = prime * result
				+ ((productDate == null) ? 0 : productDate.hashCode());
		result = prime * result
				+ ((productEndDate == null) ? 0 : productEndDate.hashCode());
		result = prime
				* result
				+ ((productIntroduce == null) ? 0 : productIntroduce.hashCode());
		result = prime * result
				+ ((productLeadtime == null) ? 0 : productLeadtime.hashCode());
		result = prime * result + productMaximumNumber;
		result = prime * result
				+ ((productName == null) ? 0 : productName.hashCode());
		result = prime * result + productNo;
		result = prime
				* result
				+ ((productStartDate == null) ? 0 : productStartDate.hashCode());
		result = prime * result + Arrays.hashCode(productStartTime);
		result = prime * result + ((ptto == null) ? 0 : ptto.hashCode());
		result = prime * result + ((time == null) ? 0 : time.hashCode());
		result = prime * result + ((upFile == null) ? 0 : upFile.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ProductTO other = (ProductTO) obj;
		if (ProductTime == null) {
			if (other.ProductTime != null)
				return false;
		} else if (!ProductTime.equals(other.ProductTime))
			return false;
		if (date == null) {
			if (other.date != null)
				return false;
		} else if (!date.equals(other.date))
			return false;
		if (pdto == null) {
			if (other.pdto != null)
				return false;
		} else if (!pdto.equals(other.pdto))
			return false;
		if (photo == null) {
			if (other.photo != null)
				return false;
		} else if (!photo.equals(other.photo))
			return false;
		if (photoName == null) {
			if (other.photoName != null)
				return false;
		} else if (!photoName.equals(other.photoName))
			return false;
		if (ppto == null) {
			if (other.ppto != null)
				return false;
		} else if (!ppto.equals(other.ppto))
			return false;
		if (productCourse == null) {
			if (other.productCourse != null)
				return false;
		} else if (!productCourse.equals(other.productCourse))
			return false;
		if (productDate == null) {
			if (other.productDate != null)
				return false;
		} else if (!productDate.equals(other.productDate))
			return false;
		if (productEndDate == null) {
			if (other.productEndDate != null)
				return false;
		} else if (!productEndDate.equals(other.productEndDate))
			return false;
		if (productIntroduce == null) {
			if (other.productIntroduce != null)
				return false;
		} else if (!productIntroduce.equals(other.productIntroduce))
			return false;
		if (productLeadtime == null) {
			if (other.productLeadtime != null)
				return false;
		} else if (!productLeadtime.equals(other.productLeadtime))
			return false;
		if (productMaximumNumber != other.productMaximumNumber)
			return false;
		if (productName == null) {
			if (other.productName != null)
				return false;
		} else if (!productName.equals(other.productName))
			return false;
		if (productNo != other.productNo)
			return false;
		if (productStartDate == null) {
			if (other.productStartDate != null)
				return false;
		} else if (!productStartDate.equals(other.productStartDate))
			return false;
		if (!Arrays.equals(productStartTime, other.productStartTime))
			return false;
		if (ptto == null) {
			if (other.ptto != null)
				return false;
		} else if (!ptto.equals(other.ptto))
			return false;
		if (time == null) {
			if (other.time != null)
				return false;
		} else if (!time.equals(other.time))
			return false;
		if (upFile == null) {
			if (other.upFile != null)
				return false;
		} else if (!upFile.equals(other.upFile))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "ProductTO [productNo=" + productNo + ", productName="
				+ productName + ", productIntroduce=" + productIntroduce
				+ ", productCourse=" + productCourse + ", productStartDate="
				+ productStartDate + ", productEndDate=" + productEndDate
				+ ", productStartTime=" + Arrays.toString(productStartTime)
				+ ", productMaximumNumber=" + productMaximumNumber
				+ ", productLeadtime=" + productLeadtime + ", productDate="
				+ productDate + ", ProductTime=" + ProductTime + ", upFile="
				+ upFile + ", photoName=" + photoName + ", date=" + date
				+ ", time=" + time + ", photo=" + photo + ", ppto=" + ppto
				+ ", pdto=" + pdto + ", ptto=" + ptto + "]";
	}

		
}
